#
#  octopus4r - a ruby wrapper for the Octopus USB board
#  Copyright (C) 2008 by Michael Conrad <do5mc@friggleware.de>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
#


module Octopus4r

  # PORTs
  PORT_1 =  1
  PORT_2 =  2
  PORT_3 =  3
  PORT_4 =  4
  PORT_5 =  5

  PORT_DIRECTION_IN = 0
  PORT_DIRECTION_OUT = 1
  PORT_DIRECTION_TRISTATE = 2

  # PINs
  PIN_1  =  1
  PIN_2  =  2
  PIN_3  =  3
  PIN_4  =  4
  PIN_5  =  5
  PIN_6  =  6 
  PIN_7  =  7
  PIN_8  =  8
  PIN_9  =  9
  PIN_10 = 10
  PIN_11 = 11
  PIN_12 = 12
  PIN_13 = 13
  PIN_14 = 14
  PIN_15 = 15
  PIN_16 = 16
  PIN_17 = 17
  PIN_18 = 18
  PIN_19 = 19

  PIN_26 = 26
  PIN_27 = 27
  PIN_28 = 28
  PIN_29 = 29
  PIN_30 = 30
  PIN_31 = 31
  PIN_32 = 32
  PIN_33 = 33
  PIN_34 = 34
  PIN_35 = 35
  PIN_36 = 36
  PIN_37 = 37
  PIN_38 = 38
  PIN_39 = 39
  PIN_40 = 40
  PIN_41 = 41
  PIN_42 = 42
  PIN_43 = 43
  PIN_44 = 44

  PIN_DIRECTION_IN = 0
  PIN_DIRECTION_OUT = 1
  PIN_DIRECTION_TRISTATE = 2
  
  # ADCs
  ADC_1 = 33
  ADC_2 = 34
  ADC_3 = 35
  ADC_4 = 36
  ADC_5 = 37
  ADC_6 = 38
  ADC_7 = 39
  ADC_8 = 40

  ADC_REFERENCE_EXTERNAL = 1
  ADC_REFERENCE_AVCC = 2
  ADC_REFERENCE_INTERNAL = 3

  # UARTs
  UART_1 = 1
  UART_2 = 2

end
